/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package slcu.model.impl;

import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;

import slcu.model.Disciplina;

import java.io.Serializable;

/**
 * The cache model class for representing Disciplina in entity cache.
 *
 * @author tito
 * @see Disciplina
 * @generated
 */
public class DisciplinaCacheModel implements CacheModel<Disciplina>,
	Serializable {
	@Override
	public String toString() {
		StringBundler sb = new StringBundler(13);

		sb.append("{disciplinaId=");
		sb.append(disciplinaId);
		sb.append(", nombre=");
		sb.append(nombre);
		sb.append(", minimoPorEquipo=");
		sb.append(minimoPorEquipo);
		sb.append(", maximoPorEquipo=");
		sb.append(maximoPorEquipo);
		sb.append(", requiereHabilitacion=");
		sb.append(requiereHabilitacion);
		sb.append(", tipoEvento=");
		sb.append(tipoEvento);
		sb.append("}");

		return sb.toString();
	}

	public Disciplina toEntityModel() {
		DisciplinaImpl disciplinaImpl = new DisciplinaImpl();

		disciplinaImpl.setDisciplinaId(disciplinaId);

		if (nombre == null) {
			disciplinaImpl.setNombre(StringPool.BLANK);
		}
		else {
			disciplinaImpl.setNombre(nombre);
		}

		disciplinaImpl.setMinimoPorEquipo(minimoPorEquipo);
		disciplinaImpl.setMaximoPorEquipo(maximoPorEquipo);
		disciplinaImpl.setRequiereHabilitacion(requiereHabilitacion);

		if (tipoEvento == null) {
			disciplinaImpl.setTipoEvento(StringPool.BLANK);
		}
		else {
			disciplinaImpl.setTipoEvento(tipoEvento);
		}

		disciplinaImpl.resetOriginalValues();

		return disciplinaImpl;
	}

	public long disciplinaId;
	public String nombre;
	public long minimoPorEquipo;
	public long maximoPorEquipo;
	public boolean requiereHabilitacion;
	public String tipoEvento;
}